package com.esdk.utils;

import com.esdk.esdk;
import com.esdk.sql.Exp;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

public class Constant{
  public final static String NULL=null,BLANK="",CRLF="\r\n",CR$LF="\r?\n",LF="\n",DOUBLE_QUOTE = "\"",SINGLE_QUOTE = "'";
  public final static BigDecimal ZERO=new BigDecimal(0),ONE=new BigDecimal(1),NEGATIVE=new BigDecimal(-1),POSITIVE=new BigDecimal(1);
  public final static String UTF8="UTF-8",GBK="GBK",ISO8859="iso-8859-1";
  public final static int DefaultCacheSec=600; //10分钟
  public final static int ResetUseCacheSec=-1;
  public final static String[] EmptyStrArr={};
  public final static Long[] EmptyLongArr={};
  public final static Integer[] EmptyIntArr={};
  public final static Map<?,?> EmptyMap=new HashMap(0);
	public final static String[] SystemFields=new String[] {"valid","create_time","create_uid","create_by","update_time","update_uid","update_by","delete_time","delete_uid","delete_by","version"};
	public final static String RowsetXmlIdentifier="list",RowXmlIdentifier="record";

  public static final Exp Exp=new Exp();
  public static final String[] AllExp=Exp.ALL; //exclude isvalid and isblank

  public static final String CreateTime="create_time",UpdateTime="update_time",DeleteTime="delete_time",Version="version",Valid="valid";

  public static final String RequestId="requestId";

  /*key会自动转换为下划线命名方式*/
  public static Map<String,String> CommonColumnMap=(Map<String,String>)esdk.map.toUnderlineCaseMap(esdk.map.strToMap(
    "{tel:电话,mobile:手机,name:名称,code:编号,centerName:中心名称,receiptNo:收据编号,sexName:性别,idCard:身份证号码,"
      + "address:地址,create_time:创建时间,create_by:创建人姓名,update_time:修改时间,update_by:更新人姓名"
      + "isDisabled:未启用,isEnabled:已启用,login_center_code:已登录中心编号,login_center_name:已登录中心名称}"));

  public static final String DefaultORMPackage="com.esdk.orm"; //默认ORM包路径

  // https://blog.csdn.net/HXNLYW/article/details/109247365
  public static final String RESET = "\033[0m";
  public static final String WHITE = "\033[0;30m";   // WHITE
  public static final String RED = "\033[0;31m";     // RED
  public static final String GREEN = "\033[0;32m";   // GREEN
  public static final String YELLOW = "\033[0;33m";  // YELLOW
  public static final String YELLOW_HIGH = "\033[0;93m";  // YELLOW
  public static final String BLUE = "\033[0;34m";    // BLUE
  public static final String PURPLE = "\033[0;35m";  // PURPLE
  public static final String CYAN = "\033[0;36m";    // CYAN
  public static final String GREY = "\033[0;37m";

}
